package com.power.leopard.remote.common.codec.json;

import java.io.InputStream;
import java.io.OutputStream;

import javax.sql.rowset.serial.SerialException;

import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.power.leopard.remote.common.codec.DefaultAbstractSerializer;

public class JacksonSerializer extends DefaultAbstractSerializer {

//	private static boolean deserializeMap = ConfigManagerLoader.getConfigManager().getBooleanValue(
//			"pigeon.codec.jackson.deserializemap", true);
	private static boolean deserializeMap = true;

	static ObjectMapper mapper = new ObjectMapper();

	static {
		mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
		mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
		mapper.setVisibility(PropertyAccessor.GETTER, Visibility.NONE);
	}
	public Object deserializeRequest(InputStream is) throws SerialException {
		// TODO Auto-generated method stub
		return null;
	}

	public void serializeRequest(OutputStream os, Object obj) throws SerialException {
		// TODO Auto-generated method stub
		
	}

	public Object deserializeResponse(InputStream is) throws SerialException {
		// TODO Auto-generated method stub
		return null;
	}

	public void serializeResponse(OutputStream os, Object obj) throws SerialException {
		// TODO Auto-generated method stub
		
	}

}
